<div class="widget_wrap">
    <div class="widget_top">
        <span class="h_icon blocks_images"></span>
        <h6>Antecedentes</h6>
    </div>

    <div class="widget_content">                    
        <table class="display data_tblsolo5">

            <thead>
                <tr>                                
                    <th>
                        fecha
                    </th>                                
                    <th>
                        Diagn&oacute;stico
                    </th>
                    <th>
                        detalles
                    </th>
                </tr>
            </thead>
            <tbody>
                <?php $i = 0; ?>
                <?php foreach ($historial as $h): ?>
                    <tr class="<?php echo fmod($i, 2) ? "gradeA even" : "gradeA odd" ?>">                                    
                        <td>
                            <?php echo $h['CiedesPaciente']['created'] ?>
                        </td>
                        <td>
                            <?php echo $h['CiedesPaciente']['codigocie'] ?> - 
                            <?php echo $h['CiedesPaciente']['descripcioncie'] ?>
                            <b>
                                ( <?php echo $h['CiedesPaciente']['observaciones'] ?> )
                            </b>    
                        </td>                                                                                                               
                        <td>                                        
                            <?php echo $this->Html->link($this->Html->image('iconos/abrehc.png', array('title' => 'Ver detalle')), array('controller' => 'Pacientes', 'action' => 'verestadopacienteimprime', $h['Consultasexterna']['id']), array('escape' => false)); ?>                                        
                        </td>
                    </tr>
                    <?php $i++; ?>
                <?php endforeach; ?>
            </tbody>
        </table>            
    </div>    
    
    <h5>OTROS ANTECEDENTES</h5>
    <div class="widget_content">                    
        <table class="display data_tblsolo5">
            <thead>
                <tr>                                                                                               
                    <th>
                        Diagn&oacute;stico
                    </th>                                
                </tr>
            </thead>
            <tbody>
                <?php foreach ($historialAnterior as $ha): ?>
                    <tr class="<?php echo fmod($i, 2) ? "gradeA odd" : "gradeA even" ?>">                                                                        
                        <td>
                            <?php echo $ha['Antecedentesanteriore']['codigocie'] ?> - 
                            <?php echo $ha['Antecedentesanteriore']['descripcioncie'] ?>
                            <b>
                                ( <?php echo $ha['Antecedentesanteriore']['observaciones'] ?> )
                            </b>    
                        </td>                                                                                                                                                  
                    </tr>
                <?php endforeach; ?>
            </tbody>
        </table>                      
    </div>
</div>